import { useRef, useState } from "react";
import { WebSocketX } from "../ws/WebSocketX";

const paramIMUrl = 'http://localhost:7001/manager';
let ws: WebSocketX | null;

export function useManagerIm() {

  if (!ws) {
    ws = new WebSocketX(paramIMUrl, { name: 'managerIm' }); // 用于工单信息更新
  }

  return ws;
}